//模板字符串
let  template = `<span>{{msg}}</span>`;
//数据模型
let data ={msg:'hello'};
//把模板字符串进行替换 ，找到 {{\w+}},把它替换成对应的模型值
let result = template.replace(/{{(\w+)}}/g,function(matched,varName){
    //matched是匹配到的结果{{msg}},varName就是msg
   console.log(matched,varName)
   //返回data的msg属性就是hello
   //就相当于把{{msg}}替换为了hello
  return data[varName]
});
console.log(result)


let str = '   #aaa#    ';
console.log(str.trim())
let obj = {a:1,b:2,c:3}
for(let ffffff in obj){
  console.log(ffffff)
}